﻿Ext.onReady(function () {
    Ext.ns('DLZ');
    Ext.ns('DLZ.ComicViewer');

    var v = new Ext.Viewport({
        layout: 'border',
        autoRender: true,
        items: [{
            xtype: 'panel',
            region: 'north',
            html: 'Allo! Center',
            frame: false,
            height: 28,
            tbar: [{
                xtype: 'button',
                text: 'Import...',
                handler: function () {
                    var fb = new DLZ.ComicViewer.FileBrowser({});
                    fb.show();
                    /*Ext.Ajax.request({
                        url: 'ajax.ashx',
                        params: {
                            cmd: 'browse',
                            br: 'mydocuments'
                        }
                    });*/
                }
            }],
            collapsable: false
        }, {
            xtype: 'panel',
            region: 'center',
            html: 'Allo! Center',
            border: false,
            collapsable: true
        }, {
            xtype: 'panel',
            region: 'west',
            width: 300,
            border: false,
            split: true,
            html: 'Allo! West'
        }]
    });
});